import request from "../utils/request";

export const login = (username, password) => {
  const data = {
    username: username,
    password: password,
  };
  return request.connection("post", "/login", data);
};

export const logout = () => {
  return request.connection("get", "/logout");
};

export const register = (data) => {
  return request.connection("post", "/user/add", data);
};

export const getUser = () => {
  return request.connection("get", "/user/getUser");
};
